@background-color: #1e1f35;
@secondary-color : #4d4d81;
@blue-color      : #1890ff;
@cyan-color      : #33ffff;
@pink-color      : #ff3399;
@yellow-color    : #ffc53d;

:root {
    --background: @background-color;
    --secondary : @secondary-color;
    --blue      : @blue-color;
    --cyan      : @cyan-color;
    --pink      : @pink-color;
    --yellow    : @yellow-color;
}

* {
    box-sizing: border-box;
}

@font-face {
    font-family: "Flama";
    font-weight: normal;
    font-style : normal;
    src        : url('https://cdn.jsdelivr.net/gh/deajax/FontFace-CDN/src/fonts/Flama/Flama-Basic.otf') format('opentype');
}

@font-face {
    font-family: "Legend";
    font-weight: normal;
    font-style : normal;
    src        : url('https://cdn.jsdelivr.net/gh/deajax/FontFace-CDN/src/fonts/Font Legend/Font Legend-Warfare.ttf') format('truetype');
}

.blue-color {
    color: @blue-color  !important;
}

.cyan-color {
    color: @cyan-color  !important;
}

.pink-color {
    color: @pink-color  !important;
}

.yellow-color {
    color: @yellow-color  !important;
}

body {
    font-size  : 14px;
    line-height: 1.5;
    background : @background-color;
    color      : white;
}

.safe-area-inset-top {
    padding-top: env(safe-area-inset-top);
}

.safe-area-inset-bottom {
    padding-bottom: env(safe-area-inset-bottom);
}

.container {
    .safe-area-inset-bottom()
}

[class*='ri-'] {
    vertical-align: -2px;
}

img {
    display: block;
}

.truncate {
    overflow     : hidden;
    text-overflow: ellipsis;
    white-space  : nowrap;
}

.truncate-2 {
    overflow          : hidden;
    text-overflow     : ellipsis;
    display           : -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.truncate-3 {
    overflow          : hidden;
    text-overflow     : ellipsis;
    display           : -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.truncate-5 {
    overflow          : hidden;
    text-overflow     : ellipsis;
    display           : -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
}

.van-empty__image {
    img {
        mix-blend-mode: soft-light;
    }
}

#home {
    position: relative;
}

.home-header-extra {
    position: absolute;
    top     : 4px;
    right   : 0;
    display : flex;
    z-index : 5;

    a {
        display: inline-flex;
    }

    .search {
        color       : white;
        font-size   : 24px;
        padding     : 0 8px;
        margin-right: 16px;

        i:before {
            vertical-align: -3px;
        }
    }

    .user-avatar {
        width : 40px;
        height: 40px;
        border: 2px solid white;
    }
}

.hometabs {
    .van-tabs__wrap {
        height : auto;
        padding: 24px;
    }

    .van-tabs__nav {
        background    : none;
        padding-bottom: 0;
    }

    .van-tab {
        position    : relative;
        flex        : 0 0 auto;
        color       : fade(white, 45%);
        padding     : 0;
        margin-right: 24px;
        font-size   : 20px;
        font-weight : 500;
        line-height : inherit;
        z-index     : 2;
    }

    .van-tab--active {
        font-size: 30px;
        color    : white;
    }

    .van-tabs__line {
        width        : 32px;
        height       : 8px;
        border-radius: 0;
        bottom       : 4px;
        background   : @pink-color;
    }
}

.hometabs-card.van-tabs--card {
    .van-tabs__wrap {
        padding: 0 20px 24px;
        height : auto;
    }

    .van-tabs__nav {
        background: none;
    }

    .van-tabs__nav--card {
        border-color: @pink-color;
    }

    .van-tab {
        flex              : 1;
        font-size         : 14px;
        margin            : 0;
        font-weight       : normal;
        line-height       : 20px;
        color             : @pink-color;
        border-right-color: @pink-color;
    }

    .van-tab--active {
        font-size : 14px;
        color     : white;
        background: @pink-color;
    }
}

.swiper {
    .swiper-container {
        height        : auto;
        padding-bottom: 32px;
        box-sizing    : content-box;

        .swiper-pagination {
            bottom: 0;
        }

        .swiper-pagination-bullet {
            background   : @secondary-color;
            border-radius: 0;
            opacity      : .4;
        }

        .swiper-pagination-bullet-active {
            background: @pink-color;
            width     : 24px;
            opacity   : 1;
        }
    }

    .swiper-slide {
        position       : relative;
        width          : calc(100% - 64px);
        padding        : 24px;
        padding-top    : 0;
        box-sizing     : border-box;
        font-size      : 14px;
        flex-direction : column;
        justify-content: flex-start;
        background     : linear-gradient(to bottom, transparent 0%, transparent 80px, fade(@secondary-color, 40%) 80px, fade(@secondary-color, 40%) 100%);

        .swiper-slide-imgs {
            position      : relative;
            width         : 100%;
            height        : 0;
            padding-bottom: 138%;
            margin-bottom : 24px;
        }

        img {
            position  : absolute;
            width     : 100%;
            height    : 100%;
            object-fit: cover;
            z-index   : 2;
        }

        .slide-shadows {
            position      : absolute;
            z-index       : 1;
            top           : 24px;
            left          : 0;
            right         : 0;
            filter        : blur(16px);
            opacity       : .45;
            mix-blend-mode: overlay;
        }
    }
}

.homeSwipe {
    padding-bottom: 40px;

    .van-swipe-item {
        padding: 0 16px;
    }

    .swiper-slide {
        padding    : 24px;
        padding-top: 0;
        box-sizing : border-box;
        background : linear-gradient(to bottom, transparent 0%, transparent 80px, fade(@secondary-color, 40%) 80px, fade(@secondary-color, 40%) 100%);
    }

    .swiper-slide-imgs {
        position      : relative;
        width         : 100%;
        height        : 0;
        padding-bottom: 135%;
        margin-bottom : 24px;
    }

    img {
        position  : absolute;
        width     : 100%;
        height    : 100%;
        object-fit: cover;
        z-index   : 2;
    }

    .slide-shadows {
        position      : absolute;
        z-index       : 1;
        top           : 24px;
        left          : 0;
        right         : 0;
        filter        : blur(16px);
        opacity       : .45;
        mix-blend-mode: overlay;
    }

    .swiper-slide-text {
        padding: 8px 0;
    }
}

.swiper-slide-text {
    color     : white;
    text-align: left;
}

.swiper-slide-title {
    font-weight: bold;
    font-size  : 20px;
    line-height: 1.25;
}

.van-rate__icon {
    color    : @yellow-color;
    font-size: 16px;
}

.swiper-slide-rate {
    margin-bottom: 4px;

    >span {
        display       : inline-block;
        font-size     : 16px;
        color         : @yellow-color;
        font-family   : 'Flama';
        margin-left   : 8px;
        vertical-align: -1px;
    }
}

.swiper-slide-desc {
    font-size    : 14px;
    color        : fade(white, 65%);
    margin-bottom: 8px;
}

.block {
    padding: 16px;
}

.block-header {
    display      : flex;
    align-items  : center;
    margin-bottom: 24px;

    .block-title {
        margin-bottom: 0;
    }

    span {
        font-size  : 12px;
        color      : fade(white, 45%);
        margin-left: 8px;
    }

    a {
        margin-left: auto;
        color      : white;

        &::after {
            content       : "\ea6e";
            font-family   : 'remixicon' !important;
            vertical-align: -2px;
        }
    }
}

.block-title {
    font-size    : 20px;
    font-weight  : bold;
    margin-bottom: 24px;
}

.recommend {
    margin: 0 -16px;

    .van-row {
        width    : max-content;
        flex-flow: nowrap;
        padding  : 0 16px;
    }
}

.scroll-view {
    white-space: nowrap;

    &::-webkit-scrollbar {
        display: none;
    }
}

.scroll-view-x {
    overflow-x: auto;
    overflow-y: hidden;
}

.scroll-view-y {
    overflow-y: auto;
    overflow-x: hidden;
}

.list-tabs {
    .van-tabs__wrap {
        height : auto;
        padding: 16px;
    }

    .van-tabs__nav {
        background    : none;
        padding-bottom: 0;
    }

    .van-tab {
        position    : relative;
        z-index     : 2;
        flex        : 0 0 auto;
        font-size   : 18px;
        margin-right: 16px;
        color       : fade(white, 45%);
    }

    .van-tab--active {
        color    : white;
        font-size: 20px;
    }

    .van-tabs__line {
        width        : var(--van-tabs-bottom-bar-width);
        height       : 6px;
        bottom       : -2px;
        background   : @pink-color;
        border-radius: 0;
    }
}

#ucenter {
    background: #303153;

    .van-nav-bar {
        background: #303153;
    }
}

.van-nav-bar {
    background: @background-color;

    &::after {
        content: none;
    }

    .van-icon {
        color    : white;
        font-size: 20px;
    }

    .van-nav-bar__title {
        font-size: 18px;
        color    : white;
    }
}

.ucenter-header {
    padding: 16px 24px 0;
}

.ucenter-user {
    display      : flex;
    align-items  : center;
    margin-bottom: 24px;

    .avatar {
        width        : 64px;
        height       : 64px;
        display      : inline-block;
        border-radius: 50%;
        border       : 2px solid white;
        overflow     : hidden;
        margin-right : 16px;
    }

    .ucenter-user-info {
        h4 {
            margin     : 0 0 2px;
            font-size  : 18px;
            font-weight: 500;
        }

        .van-tag--warning {
            position    : relative;
            background  : fade(@yellow-color, 15%);
            color       : @yellow-color;
            padding-left: 16px;

            i {
                position : absolute;
                transform: scale(1.6);
                left     : 0;
            }
        }
    }
}

.statistic {
    .van-grid-item__content {
        background: none;

        .statistic-value {
            font-family: 'Flama';
            font-size  : 24px;
            line-height: 1;
        }

        span {
            color: fade(white, 45%);
        }
    }
}

.ucenter-vip {
    background         : @secondary-color url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='205.704' height='80' viewBox='0 0 205.704 80'%3E%3Cpath d='M34.713,92.994c-3.154,0-6.308-3.137-7.885-9.411L0,13H20.514L39.45,61.624l29.982-48.63H91.522L45.761,83.583c-4.734,7.843-7.888,9.411-11.045,9.411Zm50.5-1.571L96.254,14.568H115.19L104.148,91.426H85.211ZM205.136,42.8c-1.577,7.843-4.734,15.685-12.625,21.959-6.311,4.706-14.2,7.843-22.091,7.843H137.281l-3.154,18.825H115.19L121.5,52.21h53.649c3.154,0,4.734-1.569,6.314-3.137s3.154-4.706,3.154-6.274c0-3.137,0-4.706-1.58-6.274s-4.734-3.137-6.311-3.137h-53.65L138.866,13h39.441c7.891,0,15.782,3.137,20.514,7.843C205.136,28.682,206.713,36.525,205.136,42.8Z' transform='translate%280 -12.994%29' fill='rgba%28255,255,255,0.45%29' opacity='0.1'/%3E%3C/svg%3E%0A");
    background-position: left top;
    background-repeat  : no-repeat;
    border-radius      : 8px 8px 0 0;
    padding            : 20px 24px 16px;
    margin             : 0 16px;
    display            : flex;
    align-items        : center;
    justify-content    : space-between;

    .van-button {
        height       : 32px;
        border-radius: 32px;
        background   : @yellow-color;
        border-color : @yellow-color;
        box-shadow   : 0 4px 8px -2px fade(@yellow-color, 15%);
        color        : @background-color;
    }

    .ucenter-vip-content span {
        display    : block;
        line-height: 1;
        padding-top: 8px;
    }
}

.ucenter-menu {
    padding: 16px;

    .van-grid-item__content {
        background: none;
    }

    .van-grid-item__text {
        color: white;
    }
}

.ucenter-cell-list {
    padding: 0 12px 24px;

    .van-cell-group,
    .van-cell {
        background: none;
        color     : white;

        &::after {
            content: none;
        }
    }

    .van-cell {
        padding: 12px 16px;

        &:active {
            background: fade(white, 4%);
        }
    }

    .van-cell__left-icon {
        margin-right: 8px;
        opacity     : .45;
    }

    .important {
        color: @yellow-color;
    }
}

.classify-block {
    margin-bottom: 24px;
}

.classify-header {
    display        : flex;
    align-items    : center;
    justify-content: space-between;
    margin-bottom  : 8px;

    .classify-title {
        font-family: 'Legend';
        font-size  : 24px;
        margin     : 0;
    }

    a {
        color: fade(white, 45%);

        &::after {
            content       : "\ea6e";
            font-family   : 'remixicon' !important;
            vertical-align: -2px;
        }
    }
}

.classify-content {
    display: flex;

    .van-cell-group,
    .van-cell {
        background: none;
        color     : white;

        &::after {
            content: none;
        }
    }

    .van-cell-group {
        flex    : 1;
        overflow: hidden;
    }

    .van-cell {
        padding: 8px 0;
    }

    .van-cell__title {
        .truncate();
    }

    .classify-imgs {
        flex       : 0 0 128px;
        width      : 128px;
        height     : 200px;
        overflow   : hidden;
        margin-left: 40px;

        img {
            width     : 100%;
            height    : 100%;
            object-fit: cover;
        }
    }
}

.ranking-list-item {
    display: flex;
    padding: 0 16px;

    .ranking-number {
        flex         : 0 0 auto;
        width        : 20px;
        height       : 32px;
        padding-left : 2px;
        margin-top   : 4px;
        background   : @secondary-color;
        text-align   : center;
        line-height  : 32px;
        font-family  : 'Flama';
        color        : white;
        font-size    : 16px;
        border-radius: 4px 0 0 4px;

        &.first {
            background: @yellow-color;
            color     : black;
        }

        &.secondary {
            background: @pink-color;
        }

        &.third {
            background: @cyan-color;
            color     : black;
        }
    }

    .list-item {
        flex: 1;
    }
}

#details {
    position  : relative;
    overflow-x: hidden;

    .van-nav-bar {
        background: none;

        &::after {
            content: none;
        }

        .van-icon {
            color    : white;
            font-size: 20px;
        }

        .van-nav-bar__title {
            font-size: 18px;
            color    : white;
        }
    }

    .block {
        padding: 16px 24px;
    }
}

.details-placeholder {
    position : absolute;
    top      : 0;
    width    : 100%;
    z-index  : -1;
    filter   : blur(8px);
    opacity  : .25;
    transform: scale(1.2);

    img {
        width: 100%;
    }

    &::after {
        content   : '';
        position  : absolute;
        bottom    : 0;
        width     : 100%;
        height    : 50%;
        background: linear-gradient(to top, @background-color, transparent);
    }
}

.details-header {
    padding       : 16px;
    display       : flex;
    flex-direction: column;
    align-items   : center;
    text-align    : center;
}

.details-rate {
    color: var(--yellow);

    .van-rate__item {
        padding-right: 2px;
    }

    span {
        vertical-align: -1px;
        font-family   : "Flama";
        margin-left   : 6px;
        font-size     : 16px;
    }
}

.details-image {
    width     : 210px;
    height    : 300px;
    overflow  : hidden;
    box-shadow: 0 24px 32px -4px fade(black, 35%);

    img {
        width     : 100%;
        height    : 100%;
        object-fit: cover;
    }
}

.details-meta {
    padding: 24px;

    h4 {
        margin     : 0 0 4px;
        font-size  : 24px;
        font-weight: 500;
    }

    small {
        display   : block;
        margin-top: 8px;
        font-size : 14px;
    }
}

.details-actions {
    width          : 100%;
    display        : flex;
    align-items    : center;
    justify-content: space-between;
    padding        : 16px 24px;

    .van-button {
        flex      : 1;
        margin    : 0 24px;
        background: @pink-color;
        color     : white;
        border    : none;
        box-shadow: 0 12px 24px -4px fade(@pink-color, 45%);
        font-size : 16px;

        .van-button__text {
            margin-top: -1px;
        }
    }

    a {
        padding    : 0 8px;
        font-size  : 24px;
        color      : @yellow-color;
        text-shadow: 0 4px 8px fade(@yellow-color, 25%);
    }
}

.details-extra {
    display    : flex;
    align-items: center;
    color      : @pink-color;

    .details-extra-item {
        margin: 0 16px;

        span {
            color      : white;
            margin-left: 6px;
        }
    }
}

.details-content {
    padding: 24px;

    span {
        color: fade(white, 45%);
    }

    p {
        color      : fade(white, 75%);
        line-height: 1.5715;
        .truncate-5();
    }
}

.rechange {
    padding: 16px;

    .van-grid {
        margin-bottom: 16px;
    }

    .van-grid-item__content {
        background: none;
        padding   : 8px;
    }

    .rechange-item {
        position       : relative;
        border         : 2px solid transparent;
        background     : fade(@secondary-color, 25%);
        color          : white;
        height         : 80px;
        display        : flex;
        flex-direction : column;
        align-items    : center;
        justify-content: center;
        width          : 100%;

        &.active {
            border-color: @pink-color;
        }

        span {
            position     : absolute;
            top          : -2px;
            left         : -2px;
            background   : @pink-color;
            color        : white;
            padding      : 2px 8px;
            border-radius: 0 0 16px 0;
            font-size    : 12px;
        }

        h4 {
            margin     : 8px 0 0;
            font-family: "Flama";
            font-size  : 24px;
            line-height: 1;

            small {
                font-size     : 14px;
                vertical-align: 1px;
            }
        }

        p {
            margin   : 0;
            color    : fade(white, 45%);
            font-size: 13px;
        }
    }

    .rechange-title {
        display      : block;
        font-weight  : 500;
        color        : white;
        font-size    : 18px;
        margin-bottom: 8px;
        padding      : 0 8px;
    }

    .van-cell {
        padding: 10px 8px;
    }
}

.themes-dark {
    background: none;

    &::after {
        border-color: fade(white, 15%);
    }

    .van-cell {
        background: none;
        color     : white;

        .van-cell__left-icon {
            margin-right: 8px;
            opacity     : .65;
        }

        &::after {
            border-bottom-color: fade(white, 15%);
        }
    }
}

.van-radio__icon--checked .van-icon {
    background  : @pink-color;
    border-color: @pink-color;
}

.rechange-submit {
    margin-top: 24px;
    padding   : 8px;
}

.van-button {
    font-size  : 16px;
    font-weight: 500;
}

.van-button--danger {
    background  : @pink-color;
    border-color: @pink-color;
    box-shadow  : 0 8px 16px -4px fade(@pink-color, 35%);
}

.van-popup {
    .van-cell {
        white-space: nowrap;
    }
}

.popup-submit {
    .van-button {
        border: none;
    }
}

.van-col {
    position: relative;
}

.van-search {
    background: none;

    .van-search__content {
        background: fade(@secondary-color, 45%);
    }

    .van-field__left-icon,
    .van-cell__value--alone,
    .van-field__control {
        color: white;
    }
}

.popup-view {
    height        : 100%;
    display       : flex;
    flex-direction: column;
    background    : @background-color;
}

.popup-title {
    flex         : 0 0 56px;
    line-height  : 56px;
    text-align   : center;
    font-size    : 17px;
    font-weight  : 500;
    border-bottom: 1px solid fade(white, 8%);
}

.popup-scroll-content {
    flex      : 1;
    height    : 100%;
    overflow-x: hidden;
    overflow-y: auto;
}

.catalog-img {
    width       : 80px;
    height      : 80px;
    object-fit  : cover;
    margin-right: 16px;
}